/*

Author   : chaos

FileName : equality.cpp

Date     : 12/08/17 18:27:44

*/
#include <iostream>
#include <cstring>
using namespace std;

class String
{
    private:
        char * string;
        long len;

    public:
        String(const char *);
        bool operator==(String & str)
        {
            return !strcmp(string,str.string);
        }
};

String::String(const char* i_string)
{
    len = strlen(i_string);
    string = new char[len + 1];
    strcpy(string,i_string);
}


int main(int argc ,char *argv[])
{
    String A_String("The C++ Bible");
    String B_String("C++ Explained");

    if (A_String == B_String)
        cout << "A_String == B_String" << endl;
    else
        cout << "A_String != B_String" << endl;
    return 0;
}
